package com.dd.cloud.user.entity.consult;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 预约问诊表
 * </p>
 *
 * @author czg
 * @since 2023-07-07
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "预约问诊表")
public class ConsultSubscribe implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 数据表说明:后台管理用户表
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 问诊人
     */
    @Column(length = 20, comment = "问诊人")
    private String medId;

    /**
     * 患者手机号
     */
    @Column(length = 11, comment = "患者手机号")
    private String patientPhone;

    /**
     * 患者姓名
     */
    @Column(length = 20, comment = "患者姓名")
    private String patientName;


    /**
     * 患者出生日期
     */
    @Column(length = 3, comment = "患者出生日期")
    private LocalDate patientBirthDate;


    /**
     * 患者性别 男、女
     */
    @Column(length = 2, comment = "患者性别，男、女")
    private String patientSex;

    /**
     * 患者民族
     */
    @Column(length = 20, comment = "患者民族")
    private String patientNationality;

    /**
     * 患者是否怀孕
     */
    @Column(length = 2, comment = "患者是否怀孕")
    private Integer patientPregnant;

    /**
     * 患者婚姻状态 未婚、已婚
     */
    @Column(length = 2, comment = "患者婚姻状态 未婚、已婚")
    private String patientMaritalStatus;

    /**
     * 预约的日期
     */
    @Column(comment = "预约的日期")
    private LocalDate day;

    /**
     * 咨询开始的日期 即医生首次发消息 预约开始的时间
     */
    @Column(comment = "咨询开始的时间")
    private LocalDateTime startDate;

    /**
     * 咨询结束的日期 有 1医生主动结束 2定时结束 3医生续期
     */
    @Column(comment = "咨询结束的时间")
    private LocalDateTime endDate;

    /**
     * 问诊目的
     */
    @Column(length = 20, comment = "问诊目的")
    private String aim;

    /**
     * 问诊类型 1在线问诊 2在线咨询
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "问诊类型 1在线问诊 2在线咨询")
    private Integer type;

    /**
     * 复诊类型 1复诊 2不是复诊
     */
    @Column(comment = "复诊类型 1复诊 2不是复诊")
    private Integer visitType;

    /**
     * 首诊的机构名称
     */
    @Column(length = 20, comment = "首诊的机构名称")
    private String firstMechanName;

    /**
     * 问题描述
     */
    @Column(length = 1000, comment = "问题描述")
    private String content;

    /**
     * 问题描述
     */
    @Column(type = MySqlTypeConstant.TEXT, comment = "图片url地址,多个逗号隔开")
    private String imgUrl;

    /**
     * 咨询金额
     */
    @Column(comment = "咨询金额")
    private Integer consultPrice;

    /**
     * 患者用户id
     */
    @Column(comment = "患者用户id")
    private Integer patientId;

    /**
     * 医生id
     */
    @Column(comment = "医生id")
    private Integer doctorId;

    /**
     * 状态
     */
    @Column(comment = "状态-2已退款,-1取消预约,0提交预约(未支付), " + "1发起预约(已支付), 2预约成功待开始   3咨询完成待评价 4进行中 5评价完成 6评价完成有投诉 -3.删除")
    private Integer status;

    /**
     * 问题描述
     */
    @Column(length = 100, comment = "备注,差评的原因,取消订单的原因")
    private String remark;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间", defaultValue = "now()")
    private LocalDateTime createDate;

    /**
     * 患者所选症状
     */
    @Column(comment = "症状", type = MySqlTypeConstant.TEXT)
    private String symptoms;

    /**
     * 延迟时长(分钟)
     */
    @Column(comment = "延迟时长(分钟)")
    private Integer delayMinutes;
}
